{% extends "base.html" %}
{% load i18n %}
{% load markup %}

{% block title %}{% trans "Events" %} - {{ year }}{% endblock %}

{% block extrahead %}
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" 
      href="http://{{ site.domain }}/rss/events/" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" 
      href="http://{{ site.domain }}/atom/events/" />
{% endblock %}

{% block content %}
<h2>{% trans "Events" %}</h2>
<h4>Archive for {{ year }}</h4>
{% for event in object_list %}
<div>
  <h3><a href="{{ event.get_absolute_url }}">{{ event.name }}</a></h3>
  <p class="date">{{ event.start_datetime|date:"l, F jS, Y - P" }}</p>
  <p class="byline">{% trans "Posted by" %}
    {% ifnotequal event.user.get_full_name "" %}
    {{ event.user.get_full_name }}
    {% else %}
    {{ event.user.username }}
    {% endifnotequal %}</p>
  {{ event.description|markdown|truncatewords:20 }}
</div>
{% endfor %}
{% endblock %}
